<!-- src/page/home/App.vue -->
<template>
  <h1>TEST</h1>
  <button @click="test">test</button>
  <resource-img-management :r-id="1"/>
  <div class="button-container">
    <button @click="testRoot">testRoot</button>
    <button @click="testAdmin">testAdmin</button>
    <button @click="testRAdmin">testRAdmin</button>
    <button @click="testUser">testUser</button>
    <button @click="testElse">testElse</button>
    <button @click="testApi">testApi</button>
  </div>

</template>

<script lang="ts" setup>
import axiosInstance from "@utils/axiosInstance.js";
import {globalConst} from "@constants/globalConst.js";
import {useGlobalConfirm} from "@utils/ConfirmDialogPlugin.js";
import ResourceImgManagement from "@components/resourceImgManagement.vue";
import '@assets/css/style.css'
async function testRoot() {
  console.log("testRoot:" + await axiosInstance.get(`${globalConst.baseUrl}user/test/root`))
}

async function testAdmin() {
  console.log("testAdmin:" + await axiosInstance.get(`${globalConst.baseUrl}user/test/admin`))
}

async function testRAdmin() {
  console.log("testRAdmin:" + await axiosInstance.get(`${globalConst.baseUrl}user/test/rAdmin`))
}

async function testUser() {
  console.log("testUser:" + await axiosInstance.get(`${globalConst.baseUrl}user/test/user`))
}

async function testElse() {
  console.log("testElse:" + await axiosInstance.get(`${globalConst.baseUrl}user/test/else`))
}

async function testApi() {
  console.log("testApi:" + await axiosInstance.get(`${globalConst.baseUrl}test`))
}
async function test(){
  const ref = useGlobalConfirm()
  await ref("test")
}
</script>
